package junior.util.mapstruct;

import java.util.Collection;
import java.util.List;

import org.mapstruct.InheritConfiguration;
import org.mapstruct.MappingTarget;

/**
 * Name: SimpleMapStruct
 * Function:
 *
 * @Author: K.K
 * Create Time: 2022/12/14
 * Modified By:
 * Modified Time:
 * Description:
 * Version:
 */
public interface SimpleMapStruct<Source, Target> {

    Target map(Source source);

    List<Target> mapList(Collection<Source> sources);

    /**
     * 继承映射
     *
     * @param source
     * @param target
     */
    @InheritConfiguration(name = "map")
    void copy(Source source, @MappingTarget Target target);
}
